package cn.howxu.yichen_ovo.init;

import cn.howxu.yichen_ovo.Res;
import cn.howxu.yichen_ovo.YiChenOVO;
import net.minecraft.sounds.SoundEvent;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

/**
 * @description: TODO
 * @author: HowXu
 * @date: 2025/9/12 18:05
 */
public class ModSounds {
    public static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, YiChenOVO.MODID);

    public static final RegistryObject<SoundEvent> DUCK_TOY = regSound("block.duck_toy",16);
    public static final RegistryObject<SoundEvent> BSXLYYQ = regSound("block.bsxlyyq",16);
    public static final RegistryObject<SoundEvent> BZL = regSound("block.bzl",16);
    public static final RegistryObject<SoundEvent> DGD = regSound("block.dgd",16);
    public static final RegistryObject<SoundEvent> DISLIKE = regSound("block.dislike",16);
    public static final RegistryObject<SoundEvent> WA = regSound("record.wa",16);
    public static final RegistryObject<SoundEvent> LZ = regSound("record.lz",16);
    public static final RegistryObject<SoundEvent> SWEET = regSound("record.sweet",16);
    public static final RegistryObject<SoundEvent> KKX_LOVE = regSound("record.kkx_love",16);
    public static final RegistryObject<SoundEvent> KKX_SAD = regSound("record.kkx_sad",16);
    public static final RegistryObject<SoundEvent> KKX_FRX = regSound("record.kkx_frx",16);
    
    public static final RegistryObject<SoundEvent> DAN = regSound("item.dan",16);
    
    // 谶
    public static final RegistryObject<SoundEvent> DCHEN = regSound("xcy.dchen",16);
    // 空巷
    public static final RegistryObject<SoundEvent> GOTOPARK = regSound("xcy.gotopark",16);
    
    public static RegistryObject<SoundEvent> regSound(String name,int prange){
        return SOUND_EVENTS.register(name,() -> SoundEvent.createFixedRangeEvent(Res.rl(name), prange));
    }
}
